libxl: introduce gfx_passthru_kind
authorTiejun Chen <tiejun.chen@intel.com>
Fri, 18 Sep 2015 08:30:17 +0000 (16:30 +0800)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 25 Sep 2015 14:59:06 +0000 (15:59 +0100)
commit488508b49a65dda20cf6eb6d8f549e8d758e610f
treef08572d97f8ef88a96996b466f0d4c093197417e
parent83215fba3a80c30b5191a4a1086dc510cca43069
libxl: introduce gfx_passthru_kind

Although we already have 'gfx_passthru' in b_info, this doesn't suffice
after we want to handle IGD specifically. Now we define a new field of
type, gfx_passthru_kind, to indicate we're trying to pass IGD. Actually
this means we can benefit this to support other specific devices just
by extending gfx_passthru_kind. And then we can cooperate with
gfx_passthru to address IGD cases as follows:

    gfx_passthru = 0    => sets build_info.u.gfx_passthru to false
    gfx_passthru = 1    => sets build_info.u.gfx_passthru to true and
                           build_info.u.gfx_passthru_kind to DEFAULT
    gfx_passthru = "igd"    => sets build_info.u.gfx_passthru to true
                               and build_info.u.gfx_passthru_kind to IGD

Here if gfx_passthru_kind = DEFAULT, we will call
libxl__is_igd_vga_passthru() to check if we're hitting that table to need
to pass that option to qemu. But if gfx_passthru_kind = "igd" we always
force to pass that.

And "-gfx_passthru" is just introduced to work for qemu-xen-traditional
so we should get this away from libxl__build_device_model_args_new() in
the case of qemu upstream.

Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
docs/man/xl.cfg.pod.5
tools/libxl/libxl.h
tools/libxl/libxl_dm.c
tools/libxl/libxl_types.idl
tools/libxl/xl_cmdimpl.c